<template>
  <div class="home">
    <HelloWorld msg="Welcome to Your Vue.js App" />
    {{banner}}
  </div>
</template>

<script>
import { onMounted } from 'vue'
import { getHomeAllData, getBanner } from 'network/home'

// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'Home',
  setup() {
    const banner = []

    onMounted(() => {
      getHomeAllData().then(res => {
        banner.value = res.slides
      })
    })

    return {
      banner
    }
  },
  components: {
    HelloWorld
  }
}
</script>
